package com.aabte.springcloudstudy.computeservice;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestParam;

@Slf4j
@Component
public class ComputeServiceFallback implements ComputeService {
    @Override
    public Integer add(@RequestParam(name = "a") Integer a, @RequestParam(name = "b") Integer b) {
        log.warn("Start ComputeServiceFallback#add. a: {}, b: {}", a, b);
        int mockResult = -1;
        log.warn("End ComputeServiceFallback#add. mockResult: {}", mockResult);
        return mockResult;
    }
}
